﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AMS.DD35.Common;
using AMS.DD35.Common.Data;

namespace AMS.DD35.ServiceLib.Tests
{
    class MockCharacterService : ICharacterService
    {
        public CharacterData GetCharacterData(long characterID, object sessionVariable)
        {
            if ((string)sessionVariable != "validSession")
                throw new Exception("invalid session");

            CharacterData character = new CharacterData();
            character.CharacterID = characterID;

            return character;
        }

        public void SaveCharacter(CharacterData characterData, object sessionVariable)
        {
            if ((string)sessionVariable != "validSession")
                throw new Exception("invalid session");
        }

        public IEnumerable<CharacterData> GetCharactersData(object sessionVariable)
        {
            if ((string)sessionVariable != "validSession")
                throw new Exception("invalid session");

            return new List<CharacterData>();
        }
    }
}
